import java.util.*;
import java.io.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Answer3 {
    //拓扑排序
//https://www.nowcoder.com/practice/88f7e156ca7d43a1a535f619cd3f495c?tpId=308&tqId=40470&ru=/exam/oj
    public static int n, m;
    public static Map<Integer, ArrayList<Integer>> hash = new HashMap<>();

    public static PrintWriter out = new PrintWriter(new BufferedWriter(
            new OutputStreamWriter(System.out)));
    public static Read in = new Read();

    public static void main(String[] args) throws IOException {
        n = in.nextInt();
        m = in.nextInt();

        int[] cnt = new int[n + 1]; // 用来统计 入度
        for (int i = 0; i < m; i++) {
            int x = in.nextInt(); // 起点
            int y = in.nextInt(); // 终点
            cnt[y]++;
            // 存入 hash 中
            if (! hash.containsKey(x))
                hash.put(x, new ArrayList<>());
            hash.get(x).add(y);
        }

        Queue<Integer> queue = new LinkedList<>();
        for (int i = 1; i <= n; i++) {
            if (cnt[i] == 0) queue.add(i);
        }

        int[] ret = new int[n];
        int count = 0;
        while (!queue.isEmpty()) {
            // 将入度为零的值存在 ret 中
            int x = queue.poll();
            ret[count++] = x;

            // 将 以x为起点的边 的终点 度 -1
            for (int i : hash.getOrDefault(x, new ArrayList<>())) {
                cnt[i]--;
                // 将入度为零 加入 队列
                if (cnt[i] == 0) queue.add(i);
            }
        }

        if (count == n) {
            for (int i = 0; i < n - 1; i++) {
                out.print(ret[i] + " ");
            }
            out.println(ret[n - 1]);
        } else {
            out.print("-1");
        }



        out.close();
    }


}
class Read { // 自定义快速读入
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

}